package charatr04.demo;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

/**
 *super
 * final
 */
class Flower2{
    public Flower2(){
        System.out.println("欢迎使用化花朵类");
    }
    public void language(){
        System.out.println("美好");

    }
    final public void die(){
        System.out.println("所有的花朵都会凋零");
    }
}
class Penoy2 extends Flower{//继承
    public Penoy2(){
        super();
        System.out.println("欢迎创建牡丹对象");
    }
    final public void die(){
        System.out.println("永不凋零");
    }
    public void language(){//重写
//        super.language();//使用super调用父类方法
        System.out.println("富贵");
    }
}
public class demo2 {
    public static void main(String[] args) {
        Penoy2 penoy = new Penoy2();
        penoy.language();
    }
}
